<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="../common.jsp"%>
<%@ page import="cn.firstsoft.firstframe.admin.PropertyFile"%>
<%@ page import="org.springside.core.Constants" %>
<%@ page import="java.io.*,java.util.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>管理控制台 - 环境设置 - 动态密码卡集成</title>
<%@ include file="/common/meta2.jsp"%>
<link href="../style.css" type="text/css" rel=stylesheet>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
	<table width="100%" align="center" >
		<TR>
			<TH class=listViewPaginationTdS1  align=left colSpan=4>
			设置动态密码卡的集成参数

			</TH>
		</TR>
		<tr>
			<td class=dataLabel width="15%" align="right">动态密码卡厂商：</td>
			<td class=dataField>
				<select name="provider" size=1 onchange="changeProvider(this.options[this.selectedIndex].value+'Option');">
					<option value="false">无动态密码卡集成</option>
					<option value="true" <%="true".equals(PropertyFile.readValue("firstframe.properties", "plugins.dynamic"))?"selected":"" %>>深圳海月通信(http://www.seamoon.com.cn)</option>
				</select>
			</td>
			<td align="left">只支持海月动态密码卡，当前系统状态：<%="true".equals(Constants.DYNAMIC)?"集成":"未集成" %></td>
		</tr>
		<script language="javascript">
			function changeProvider(p) {
				var dis = <%="true".equals(PropertyFile.readValue("firstframe.properties", "plugins.dynamic"))?"false":"true" %>;
				
				document.getElementById('falseOption').style.display='none';
				document.getElementById('trueOption').style.display='none';
				
				if (p == 'falseOption') {
					if (!dis) {
						document.getElementById(p).style.display='inline';
					}
				} else {
					document.getElementById(p).style.display='inline';
				}
			}
		</script>
		<tr id="falseOption" style="display:none">
			<td class=dataLabel width="15%" align="right"></td>
			<td class=dataField>
				<form action="dynamic_set.jsp" method="post">
				<input type="hidden" name="provider" value="false">
				<input type="submit" name="subt" value="&nbsp;提&nbsp;&nbsp;交&nbsp;">
				<input type="reset" name="rest" value="&nbsp;重&nbsp;&nbsp;置&nbsp;">
				</form>
			</td>
			<td align="left">提交则取消动态密码卡集成</td>
		</tr>		
		<tr id="trueOption" style="display:<%="true".equals(PropertyFile.readValue("firstframe.properties", "plugins.dynamic"))?"inline":"none" %>">
			<td class=dataLabel width="15%" align="right">海月密码卡配置：</td>
			<td class=dataField>
				<form action="dynamic_set.jsp" method="post">
				<input type="hidden" name="provider" value="true">
				海月数据库类型(dbtype)：<select name="dbtype" size=1>
										<option value='1' <%="1".equals(PropertyFile.readValue("plugins/webconfig.properties", "dbtype"))?"selected":"" %>>Oracle</option>
										<option value='2' <%="2".equals(PropertyFile.readValue("plugins/webconfig.properties", "dbtype"))?"selected":"" %>>SQL Server</option>
										<option value='3' <%="3".equals(PropertyFile.readValue("plugins/webconfig.properties", "dbtype"))?"selected":"" %>>DB2</option>
										<option value='4' <%="4".equals(PropertyFile.readValue("plugins/webconfig.properties", "dbtype"))?"selected":"" %>>MySql</option>
									</select><br>
				海月数据库地址(dbserver)：<input type="text" name="dbserver" value="<%=PropertyFile.readValue("plugins/webconfig.properties", "dbserver") %>"><br>
				海月数据库端口(dbport)：<input type="text" name="dbport" value="<%=PropertyFile.readValue("plugins/webconfig.properties", "dbport") %>"><br>
				海月数据库名称(dbname)：<input type="text" name="dbname" value="<%=PropertyFile.readValue("plugins/webconfig.properties", "dbname") %>"><br>
				海月数据库用户(dbuser)：<input type="text" name="dbuser" value="<%=PropertyFile.readValue("plugins/webconfig.properties", "dbuser") %>"><br>
				海月数据库密码(dbpassword)：<input type="text" name="dbpassword" value="<%=PropertyFile.readValue("plugins/webconfig.properties", "dbpassword") %>"><br>
				<input type="submit" name="subt" value="&nbsp;提&nbsp;&nbsp;交&nbsp;">
				<input type="reset" name="rest" value="&nbsp;重&nbsp;&nbsp;置&nbsp;">
				</form>
			</td>
			<td align="left">
				配置文件为：plugins\<a href="../application/file_download.jsp?filePath=<%=(System.getProperty("oa_application.config")+"/plugins/webconfig.properties</") %>&fileName=webconfig.properties</">webconfig.properties</a><br>
				<a href="dynamic_seamoon.jsp">海月后台管理系统安装步骤</a><br>
				<a href="sm.rar">下载海月后台管理程序</a>
			</td>
		</tr>
	</table>
</body>
</html>
